package com.nulldev.util.threading.legacy.dbg;

public class ProcessInfoStats extends AbstractInfoStats
{
    private String name;

    public ProcessInfoStats(final String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public Integer getPriority() {
        return null;
    }

    public Thread.State getState() {
        return null;
    }

    public boolean getSelect() {
        return false;
    }

    public long getId() {
        return -1L;
    }

    public void setIndex(final int n) {
    }

    public void setSelect(final boolean b) {
    }

    public long update(final long lastCpuUsage) {
        this.usageHistory[this.historyIndex] = this.percentage;
        this.historyIndex = ++this.historyIndex % this.historyLength;
        if (this.nrOfValidValues <= this.historyLength) {
            ++this.nrOfValidValues;
        }
        return this.lastCpuUsage = lastCpuUsage;
    }

    public void setPercentage(final int percentage) {
        this.percentage = percentage;
    }
}

